<!DOCTYPE html>
<html lang="zh">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <script src="https://unpkg.com/dayjs@1.8.15/dayjs.min.js"></script>
  <title>Screenshot</title>
  <style>
    html,
    body {
      margin: 0;
      padding: 0;
      width: 100%;
      height: 100%;
    }

    img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: contain;
    }
  </style>
</head>

<body>
  <img src="/shot" />

  <script>
    (function () {
      let img = document.querySelector('img')

      setInterval(() => {
        let now = dayjs()
        document.title = now.format('YYYY-MM-DD HH:mm:ss')
        img.src = '/shot?r=' + now.valueOf()
      }, 10000)
    })()
  </script>
</body>

</html>
